<?php
	$hostname = "localhost";
   	$databaseName = "bacmattrang";
   	$username = "root";
   	$password = "";

        /*$hostname = "sql307.byethost4.com";
   	$databaseName = "b4_11431631_bacmattrang";
   	$username = "b4_11431631";
   	$password = "trunghoa";*/
	
	if(!($connection = @mysql_connect($hostname, $username, $password)))
	{
		die("Error: Cannot connect to database !!!");
	}		
	if (!(mysql_select_db($databaseName, $connection))) 
	{
		die("Error: Cannot select database name: $databaseName");
	}
        $connection = mysql_connect($hostname, $username, $password);
        mysql_select_db($databaseName,$connection);
        mysql_query("set names 'utf8'");
 
?>